home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software of the Month Club 2000 October
/
Software of the Month - Ultimate Collection Shareware 277.iso
/
pc
/
PROGRAMS
/
UTILITY
/
WINLINUX
/
DATA1.CAB
/
programs_-_include
/
ASM-ARM
/
CURRENT.H
< prev
next >
Wrap
C/C++ Source or Header
|
1999-09-17
|
407b
|
24 lines
#ifndef _ASMARM_CURRENT_H
#define _ASMARM_CURRENT_H
static inline unsigned long get_sp(void)
{
unsigned long sp;
__asm__ ("mov %0,sp" : "=r" (sp));
return sp;
}
static inline struct task_struct *get_current(void)
{
struct task_struct *ts;
__asm__ __volatile__("
bic %0, sp, #0x1f00
bic %0, %0, #0x00ff
" : "=r" (ts));
return ts;
}
#define current (get_current())
#endif /* _ASMARM_CURRENT_H */